package com.zhiyou100.mapper;

import com.zhiyou100.model.Permission;
import com.zhiyou100.model.Role;
import com.zhiyou100.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    User findUserByEmail(@Param("email") String email);

    List<String> findRoleById(@Param("id") Integer id);

    List<String> findPermissionById(@Param("id") Integer id);

    void insert(@Param("user") User user);

    Integer findByPhoneNum(@Param("phoneNum") String phoneNum);

    Integer findByEmail(@Param("email") String email);

    User findById(@Param("id") Integer id);
}
